package edu.biwu.config;

import org.springframework.context.annotation.Bean;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.TransactionManager;
import org.springframework.transaction.annotation.Transactional;

import javax.sql.DataSource;

/**
 * @author 王俊彪
 * @version 1.0
 */
public class TransactionConfig {
    @Bean("transactionManager")
    public TransactionManager initTransactionMangager(DataSource dataSource){
        return new DataSourceTransactionManager(dataSource);
    }
}
